import QtQuick 1.0

Rectangle {
    id: myApp
    width: 360
    height: 640

    AboutDialog{
        id: aboutDialog
    }


    Image {
        id: appBacnground
        source: "images/background.png"
        anchors.top: parent.top
        // === Title bar ===//
        TitleBar{
            id: appTitle
        }

        // === Row for View Switching ===//
        Row{
            id: viewContaier
            anchors.top: appTitle.bottom

            // === Weather View ===//
            WeatherView{
            }

            // === News View ===//
            NewsView{
            }
        }

        // Navigation Bar
        NavigationBar{
            id: navigationBar
        }
    }

    // === States and Transitions ===//
    states: [
        State {
            name: "newsView"
            PropertyChanges {
                target: viewContaier
                x: -360
            }
            PropertyChanges {
                target: navigationBar
                source: "images/navigationbar2.png"
            }
        }
    ]


    transitions: [
        Transition {
            NumberAnimation { target: viewContaier; property: "x"; duration: 1000; easing.type: Easing.OutElastic}
        }
    ]

}
